<?php
/**
 * Created by PhpStorm.
 * User: zlkmu
 * Date: 2017/8/24
 * Time: 9:52
 */
    require_once ('../Common.php');
    require_once ('../BusinessFee/BusinessFee.php');
    require_once ('PDFCreator.php');

    $fee_id = $_REQUEST['approval_id'];
    if(!isset($fee_id)){
        exit(json_encode(array('state'=>0, 'error'=>'POST_ERROR')));
    }

    $b_fee = new BusinessFee();
    $r = $b_fee->getUnOfficialAppPDFData($fee_id);
    if(!$r){
        exit(json_encode(array('state'=>0, 'error'=>'DB_ERROR')));
    }
   // print_r($r);

//
    $pdf = new PDFCreator();
    $r = $pdf->createUnOfiicialPDF($r);
    echo json_encode(array('state'=>1, 'url'=>$r));




?>